package biz.ezcom.design.pattern.factory.simple;

public class Client {
	public static void main(String[] args) {
		double numberA = 12.34;
		double numberB = 2;
		
		Operator operator = Factory.newInstance("+");
		double result = operator.getResult(numberA, numberB);
		System.out.println(result);
		
		operator = Factory.newInstance("-");
		result = operator.getResult(numberA, numberB);
		System.out.println(result);
		
		operator = Factory.newInstance("*");
		result = operator.getResult(numberA, numberB);
		System.out.println(result);
		
		operator = Factory.newInstance("/");
		result = operator.getResult(numberA, numberB);
		System.out.println(result);
		
	}
}
